import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../views/home/home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: home,
    redirect: "/home",
  },
  {
    path: '/home',
    name: 'home',
    redirect: "/home/chart",
    component: home,
    children: [
      {
        path: "chart",
        component: () => import('../views/home/chart/chart.vue'),
        meta: {
          title: "数据概览",
          icon: "el-icon-pie-chart"
        }
      },
      {
        path: "antv",
        component: () => import('../views/home/antv/antv.vue'),
        meta: {
          title: "蚂蚁图表",
          icon: "el-icon-user"
        }
      },
      {
        path: "question",
        component: () => import('../views/home/el-transfer/el-transfer.vue'),
        meta: {
          title: "穿梭层",
          icon: "el-icon-edit-outline"
        }
      },
      {
        path: "business",
        component: () => import('../views/About.vue'),
        meta: {
          title: "列表",
          icon: "el-icon-office-building"
        }
      },
      {
        path: "subject",
        component: () => import('../views/About.vue'),
        meta: {
          title: "列表",
          icon: "el-icon-notebook-2"
        }
      },
    ]
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
